<?php
set_time_limit(0);
include 'conn.php'; 
$array = array("S1614953E","S2846440A", 
"S4130906G", 
"S5582339A", 
"S5799063E", 
"S6502432B", 
"S7587574F", 
"S8111165J", 
"S8516167I", 
"S8976390H", 
"S9837354C"); 
$startDate = '2013-08-01';
$endDate = '2013-08-20';
$checkDate = $startDate;
while($checkDate<=$endDate) 
{ 
	$signInTimeStamp = $checkDate . " 08:00:00";
	$signOutTimeStamp = $checkDate . " 17:00:00";
	foreach($array as $value) { 
            $perf= rand(1,5);
		$act = rand(1,4);
		 $sql = "INSERT INTO attendancerecord( `NRIC`, `CentreId`, `SignInTimeStamp`, `SignOutTimeStamp`, `Status`, `AuditSignIn`, `AuditSignOut`, `AuditVerify`) VALUES ('".$value."',2,'".$signInTimeStamp."', '".$signOutTimeStamp."' ,'Verified','John','Jim','Jim')";
		$result = mysql_query($sql); 
		
	
	 
}
$checkDate = date('Y-m-d', strtotime('+1 day', strtotime($checkDate)));
}
$today = date('l',strtotime('24-08-2013'));
echo $today;
?>